package com.bdqn.Service.SysUsers.impl;

import com.bdqn.Service.SysUsers.SysUsersService;
import com.bdqn.entity.SysUsers;
import com.bdqn.mapper.SysUsers.SysUsersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SysUsersServiceImpl implements SysUsersService {
    @Resource
    SysUsersMapper sysUsersMapper;
    @Override
    public SysUsers findByName(String principal) {
        return sysUsersMapper.findByName(principal);
    }

    @Override
    public boolean InsertUser(SysUsers sysUsers) {
        return sysUsersMapper.InsertUser(sysUsers);
    }

    @Override
    public boolean InsertUser_role(int id) {
        return sysUsersMapper.InsertUser_role(id);
    }

    @Override
    public int updatePwd(int id, String toHex) {
        return sysUsersMapper.updatePwd( id, toHex);
    }
}
